#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from Utils.Logger import Logger
import unittest
logger = Logger().get_logger()


def run_with_text_runner(test_suite):
    try:
        runner = unittest.TextTestRunner()
        runner.run(test_suite)
    except Exception as e:
        logger.error("Fail to run with text runner: {0}".format(e)[:-1])
        raise e
